# Maintainer: zccrs <zhangjide@deepin.org>
pkgname=dtkdeclarative-git
pkgver=1.0.0
pkgrel=1
pkgdesc='Deepin Toolkit, declarative module for DDE look and feel'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/dtkdeclarative"
license=('LGPL3')
depends=('dtkgui-git' 'qt5-declarative' 'qt5-quickcontrols2')
makedepends=('git' 'qt5-tools' 'dtkcommon-git' 'dtkcore-git' 'dtkgui-git' 'qt5-declarative' 'qt5-quickcontrols2' 'gtest' 'cmake'  'ninja' 'doxygen')
conflicts=('dtkdeclarative')
provides=('dtkdeclarative')
groups=('deepin-git')
source=('source.tar.gz')
sha512sums=('SKIP')

prepare() {
    cd $deepin_source_name
}

build() {
  cd $deepin_source_name
  cmake -GNinja \
      -DMKSPECS_INSTALL_DIR=lib/qt/mkspecs/modules/\
      -DBUILD_DOCS=ON \
      -DBUILD_EXAMPLES=OFF \
      -DQCH_INSTALL_DESTINATION=share/doc/qt \
      -DCMAKE_INSTALL_LIBDIR=lib \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release
}

package() {
  cd $deepin_source_name
  DESTDIR="$pkgdir" ninja install
}
